package com.gwd.task.controller;

import com.gwd.task.model.WorkStatisticsDTO;
import com.gwd.task.services.WorkStatistServer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author zhiyongming
 * @date 2020/12/31 11:09
 */
@RestController
@RequestMapping(value = "/v1/statist")
public class WorkStatisticsController {
    @Resource
    private WorkStatistServer workStatistServer;

    @GetMapping(value = "findByGroup")
    public List<WorkStatisticsDTO> findByGroup(@RequestParam(value = "groupCode") String groupCode) {
        return workStatistServer.statist(groupCode);
    }
}
